<?php
	class Setting_model extends CI_Model {

		function __construct(){
			parent::__construct();
		}
		
		function read(){	
			$query = $this->db->get('setting');
			return $query->result();
		}
		
		function edit($id){
			$this->db->where('id_setting',$id);
			$query=$this->db->get('setting');
			return $query->row();
		}
		
		function update($id_setting,$data){
			$this->db->where('id_setting', $id_setting);
			$update = $this->db->update('setting', $data);
			return $update;
		}

		function seo(){	
			$this->db->where('id_setting in (1,2,3)');
			$query = $this->db->get('setting');
			return $query->result();
		}

		function pesan(){	
			$this->db->where('id_setting in (6,7)');
			$query = $this->db->get('setting');
			return $query->result();
		}
	}
?>